package com.sense.kukoo.biz_me.utils

import android.os.Build
import com.google.gson.Gson
import com.sense.kukoo.common.utils.AppUtil
import com.sense.kukoo.common.utils.ApplicationContext
import com.sense.kukoo.common.utils.NetworkTypeUtils
import com.sense.kukoo.common.utils.PhoneUtil

/**
 * <br> ClassName:   HttpParamUtil.kt
 * <br> Description: HTTP请求参数构建工具类
 * <br> Author:      lionszhang
 * <br> Date:        2021/11/12
 */

object HttpParamUtil {


    fun getCommonParam(): String {
        var map = hashMapOf<String, String>()
        map["region"] = "TW"
        map["platform"] = "3"
        map["osVersion"] = "" + Build.VERSION.SDK_INT
        map["connectType"] = NetworkTypeUtils.getNetWrokType(ApplicationContext.instance())
        map["uuid"] = ""
        map["version"] = AppUtil.getAppVersion(false)
        map["deviceId"] = PhoneUtil.getDeviceID(ApplicationContext.instance())
        map["iphoneType"] = PhoneUtil.getDeviceModel()
        map["appName"] = ApplicationContext.getString(com.sense.kukoo.common_i18n.R.string.app_name)
        return Gson().toJson(map)
    }

}